package cn.itrip.dao.mapper;

import cn.itrip.beans.pojo.ItripHotelTempStore;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ItripHotelTempStoreMapper {
    int deleteByPrimaryKey(Long id)throws  Exception;

    /**
     *
     * @param hotelId
     * @param roomId
     * @return
     */
    int updatestoreByid(@Param("hotelId") long hotelId);
    /**
     * 增加库存信息
     * @param record
     * @return
     * @throws Exception
     */
    int insert(ItripHotelTempStore record)throws  Exception;

    int insertSelective(ItripHotelTempStore record)throws  Exception;

    /**
     * 查询库存表是否有数据
     * @param id
     * @return
     * @throws Exception
     */
    List<ItripHotelTempStore> selectByPrimaryKey(@Param("hotelId") long hotelId,@Param("roomId")long roomId)throws  Exception;

    int updateByPrimaryKeySelective(ItripHotelTempStore record)throws  Exception;

    /**
     * 根据酒店id修改库存表
     * @param itripHotelTempStore
     * @return
     */
    int updateByHotelId(ItripHotelTempStore itripHotelTempStore)throws  Exception;

    /**
     * 修改订单库存 定时器
     * @return
     * @throws Exception
     */
    int update(@Param("hotelId") long hotelId,@Param("roomId") long roomId)throws  Exception;
    /**
     * 修改订单状态 定时器
     * @return
     * @throws Exception
     */
    int updateById(@Param("id") long id)throws  Exception;

    /**
     *
     * @param hotelId
     * @param roomId
     * @return
     */
    ItripHotelTempStore selectByRoomId(long hotelId,long roomId);
    /**
     * 根据roomId修改房间库存
     * @param roomId
     * @return
     */
    ItripHotelTempStore selectTempStore(long roomId);

}